import {
  IEditorContainerController,
  IEditorProvider,
} from '@ibiz-template/runtime';
import { IPicker } from '@ibiz/model-core';
import { CheckinHolidayCalendarController } from './checkin-holiday-calendar.controller';

export class CheckinHolidayCalendarProvider implements IEditorProvider {
  formEditor: string = 'IBizCheckinHolidayCalendar';

  gridEditor: string = 'IBizCheckinHolidayCalendar';

  async createController(
    editorModel: IPicker,
    parentController: IEditorContainerController,
  ): Promise<CheckinHolidayCalendarController> {
    const c = new CheckinHolidayCalendarController(
      editorModel,
      parentController,
    );
    await c.init();
    return c;
  }
}
